import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;


public class Roster extends UserInterface {

	public HashMap<Integer, Player> jerseyMap = new HashMap<Integer, Player>();
	//maps jersey number to player name


	public void addPlayer( int jerseyNum, Player name) {
		jerseyMap.put(jerseyNum,name);
	}


	public Player getPlayer(int number) {
		return this.jerseyMap.get(number);
	}

	public void removePlayer( int jerseyNum, Player name){
		jerseyMap.remove(jerseyNum);
	}

	public void getAllPlayer(String playerName, int jerseyNum, int height, int weight, int yob, String college, 
			String position){
		final int size; 
		size = jerseyMap.size();
		Iterator iterator = jerseyMap.keySet().iterator();
		
		//for(jerseyMap.keySet().iterator();iterator.hasNext();){
//		iterator.hasNext();
		for(int x = 0; x<size;x++){
		   
			
			 jerseyMap.get(iterator.next());
			 jerseyMap.values();
			
			System.out.println(iterator);
			
			 
			// System.out.printf("%s\t %d\t %d\t %d\t %d\t %s\t %s\t\n",getPlayerName(), getJerseyNum(), getHeight(), getWeight(), 
				//	getYob(), getCollege(), getPosition());
			 }
			 
			 
	
		//Collection x = jerseyMap.values();
		//Iterator itr = x.iterator();
		
		}
	}


//print out hashmap by looping but DOES NOT LINK UP TO OUR USERINTERFACE
//how does our for loop not repeat the same player nine times???